home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / STRINGS / PACKAGE6 / FILE.DOC < prev    next >
Text File  |  1990-07-25  |  1KB  |  40 lines

  1. -----------------------------------------------------------------------------
  2. ReadlnFromFile
  3. -----------------------------------------------------------------------------
  4.  
  5. declaration:    procedure ReadLnFromFile (var InFile:
  6.                                                 text;
  7.                                           var AString:
  8.                                                 TypeString);
  9.  
  10. purpose:        To read from the Infile a string of characters and to put in
  11.                 a packed array. Length shall be = to the number of elements in
  12.                 the array
  13.  
  14. preconditions:  AString declared.  InFile has been opened (if necessary) and
  15.                 is available to read from.
  16.  
  17. postConditions: AString Filled with either an empty set if InFile is empty,
  18.                  or is filled with characters in InFile up to End of Line
  19.  
  20. special cases:  none
  21.  
  22. example:        var
  23.                   AString:
  24.                     TypeString;
  25.                   AnyFile:
  26.                     text;
  27.  
  28.                   begin
  29.                     .
  30.                     .
  31.                     .
  32.                     write (output,'Getting name from file: ');
  33.                     ReadlnString (AnyFile, AString);
  34.                     .
  35.                     .
  36.                     .
  37.                   end
  38.  
  39. -----------------------------------------------------------------------------
  40.